﻿<UserControl x:Class="SheepClock.CustomUIComponents.AlarmItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="80" d:DesignWidth="450" xmlns:my="clr-namespace:SheepClock.CustomUIComponents">
	<UserControl.Resources>
		<Storyboard x:Name="PushStoryBoard">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ButtonBack">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.8">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="64" />
            <ColumnDefinition Width="100" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <TextBlock x:Name="AlarmName" 
                   Grid.Column="0"
                   Height="46"
                   HorizontalAlignment="Left" 
                   Text="TextBlock" 
                   VerticalAlignment="center"
                   Width="174" 
                   Margin="120,10,0,12"
                   FontSize="32"/>

        <TextBlock x:Name="AlarmTime"
                   Grid.Column="0"
                   Height="46" 
                   HorizontalAlignment="Left" 
                   Margin="12,10,0,12"
                   Text="@15:38"
                   VerticalAlignment="Center" 
                   FontSize="32"
                   Width="115"
                   Foreground="{StaticResource PhoneAccentBrush}"/>
        

        <Ellipse x:Name="ButtonBack"
                 Grid.Column="1" 
                 HorizontalAlignment="Center"
                 VerticalAlignment="Center"
                 Width="48"
                 Height="48" 
                 Stroke="Transparent"
                 StrokeThickness="1" 
                 Fill="{StaticResource PhoneAccentBrush}"
                 Opacity="0"
                 />
        <Rectangle x:Name="editButton"
                   Grid.Column="1"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"
                   Width="48"
                   Height="48"
                   Fill="{StaticResource PhoneContrastBackgroundBrush}"
                   MouseLeftButtonDown="saveButton_MouseLeftButtonDown">
            <Rectangle.OpacityMask>
                <ImageBrush ImageSource="../Images/edit.png"/>
            </Rectangle.OpacityMask>
        </Rectangle>

        <my:Switch x:Name="AlarmSwitch"
                   Grid.Column="2"
                   HorizontalAlignment="Center"
                   VerticalAlignment="Center"/>
        
    </Grid>
</UserControl>
